<div class="panel panel-default panel-intro">
    {:build_heading(null,FALSE)}
    <div class="panel-heading">
        <h4 class="panel-title">退款详情</h4>
    </div>

    <div class="panel-body">
        <div class="row">
            <div class="col-xs-12 col-sm-8 col-sm-offset-2">
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">退款单号:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">{$row.refund_no}</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">微信退款单号:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">{$row.refund_id ?: '-'}</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">用户ID:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">{$row.user_id} ({$row.user.username ?? '-'})</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">订单号:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">{$row.order.order_sn ?? '-'}</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">微信支付订单号:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">{$row.order.out_trade_no ?? '-'}</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">订单金额:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">￥{$row.total_fee}</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">退款金额:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">￥{$row.refund_fee}</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">退款状态:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">
                            {if $row.status == 0}
                                <span class="label label-warning">处理中</span>
                            {elseif $row.status == 1 /}
                                <span class="label label-success">成功</span>
                            {else /}
                                <span class="label label-danger">失败</span>
                            {/if}
                        </p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">退款原因:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">{$row.refund_reason ?: '-'}</p>
                    </div>
                </div>
                {if $row.status == 2}
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">失败原因:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static text-danger">{$row.fail_reason ?: '-'}</p>
                    </div>
                </div>
                {/if}
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">申请时间:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">{:date('Y-m-d H:i:s', $row.create_time)}</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-3">更新时间:</label>
                    <div class="col-xs-12 col-sm-8">
                        <p class="form-control-static">{:date('Y-m-d H:i:s', $row.update_time)}</p>
                    </div>
                </div>
                <div class="form-group layer-footer">
                    <label class="control-label col-xs-12 col-sm-3"></label>
                    <div class="col-xs-12 col-sm-8">
                        {if $row.status == 0}
                        <a href="javascript:;" class="btn btn-success btn-sync" data-url="refund/sync" data-ids="{$row.id}">同步退款状态</a>
                        {/if}
                        <a href="javascript:;" class="btn btn-default btn-close">关闭</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>